﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Threading;
using System.Globalization;
using System.Text.RegularExpressions;
using Nivdal.TBP;
using Nivdal.AuxCode;


namespace Nivdal
{
    public partial class TournamentScorers : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string TournamentId;
            GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
            if (Request.QueryString["TournamentId"] != null)
            {
                TournamentId = Request.QueryString["TournamentId"];
                ScorersDataSource.SelectParameters.Add("TournamentId", TournamentId);
                string TournamentName = GND.ReadNivdalStringData("TournamentId", "Nivdal_GetTournamemtName", TournamentId);
                PageNameLabel.Text = TournamentName + " " + Resources.Resource.TournamentScorers_PageTitle;
                TournamentNameLabel.Text = TournamentName + " " + Resources.Resource.TournamentScorers_PageTitle;
                Title = Resources.Resource.Default_PageTitle + ", " + TournamentName + " " + Resources.Resource.TournamentScorers_PageTitle;
                TournamentLink.NavigateUrl = "~/Tournament.aspx?Id=" + TournamentId;
            }
            else
                Response.Redirect("~/TeamHomePage.aspx");


        }

        protected override void InitializeCulture()
        {
            OnlineUser ou = (OnlineUser)Session["User"];
            Thread.CurrentThread.CurrentUICulture = new CultureInfo(ou.UICulture);
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(ou.Culture);
        }
    }
}